package db.pojo;

import java.util.*;
import java.text.SimpleDateFormat;
import db.ext.Ea_demo_sfxmExt;
@SuppressWarnings("unchecked")
/**
 * ea_demo_sfxm
 */
public class Ea_demo_sfxm {
	/**
	 * XMID
	 */
	public String xMID;
	/**
	 * SFDLBM
	 */
	public String sFDLBM;
	/**
	 * XMMC
	 */
	public String xMMC;
	/**
	 * XMRJ
	 */
	public String xMRJ;
	/**
	 * GG
	 */
	public String gG;
	/**
	 * DW
	 */
	public String dW;
	/**
	 * ZFBL
	 */
	public double zFBL;
	/**
	 * JX
	 */
	public String jX;
	/**
	 * CD
	 */
	public String cD;
	/**
	 * QYBZ
	 */
	public String qYBZ;
	/**
	 * YYBM
	 */
	public String yYBM;
	/**
	 * GGSJ
	 */
	public java.util.Date gGSJ;
	SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	public static Ea_demo_sfxmExt DB = new Ea_demo_sfxmExt(); 
	
	public Ea_demo_sfxm() {
		super();
	}
	
	public Ea_demo_sfxm(String xMID, String sFDLBM, String xMMC, String xMRJ, String gG, String dW, double zFBL, String jX, String cD, String qYBZ, String yYBM, java.util.Date gGSJ) {
		super();
		this.xMID = xMID; 
		this.sFDLBM = sFDLBM; 
		this.xMMC = xMMC; 
		this.xMRJ = xMRJ; 
		this.gG = gG; 
		this.dW = dW; 
		this.zFBL = zFBL; 
		this.jX = jX; 
		this.cD = cD; 
		this.qYBZ = qYBZ; 
		this.yYBM = yYBM; 
		this.gGSJ = gGSJ; 
	}
	
	public String getXMID() {
		return xMID;
	}

	public void setXMID(String xMID) {
		this.xMID = xMID;
	} 
	
	public String getSFDLBM() {
		return sFDLBM;
	}

	public void setSFDLBM(String sFDLBM) {
		this.sFDLBM = sFDLBM;
	} 
	
	public String getXMMC() {
		return xMMC;
	}

	public void setXMMC(String xMMC) {
		this.xMMC = xMMC;
	} 
	
	public String getXMRJ() {
		return xMRJ;
	}

	public void setXMRJ(String xMRJ) {
		this.xMRJ = xMRJ;
	} 
	
	public String getGG() {
		return gG;
	}

	public void setGG(String gG) {
		this.gG = gG;
	} 
	
	public String getDW() {
		return dW;
	}

	public void setDW(String dW) {
		this.dW = dW;
	} 
	
	public double getZFBL() {
		return zFBL;
	}

	public void setZFBL(double zFBL) {
		this.zFBL = zFBL;
	} 
	
	public void changeZFBLWith(double zFBL){
		this.zFBL += zFBL;
	}
	
	public void changeZFBLWithMin(double zFBL,double min){
		this.zFBL += zFBL;
		this.zFBL = this.zFBL < min ? min : this.zFBL;
	}
	
	public void changeZFBLWithMax(double zFBL,double max){
		this.zFBL += zFBL;
		this.zFBL = this.zFBL > max ? max : this.zFBL;
	}
	
	public void changeZFBLWithMaxMin(double zFBL,double max,double min){
		this.zFBL += zFBL;
		this.zFBL = this.zFBL < min ? min : this.zFBL;
		this.zFBL = this.zFBL > max ? max : this.zFBL;
	}	
	public String getJX() {
		return jX;
	}

	public void setJX(String jX) {
		this.jX = jX;
	} 
	
	public String getCD() {
		return cD;
	}

	public void setCD(String cD) {
		this.cD = cD;
	} 
	
	public String getQYBZ() {
		return qYBZ;
	}

	public void setQYBZ(String qYBZ) {
		this.qYBZ = qYBZ;
	} 
	
	public String getYYBM() {
		return yYBM;
	}

	public void setYYBM(String yYBM) {
		this.yYBM = yYBM;
	} 
	
	public java.util.Date getGGSJ() {
		return gGSJ;
	}

	public void setGGSJ(java.util.Date gGSJ) {
		this.gGSJ = gGSJ;
	} 
	
	
	public Map ea_demo_sfxmToMap() {
		Map map = new HashMap();
		try {
			map.put("xMID",this.xMID);
			map.put("sFDLBM",this.sFDLBM);
			map.put("xMMC",this.xMMC);
			map.put("xMRJ",this.xMRJ);
			map.put("gG",this.gG);
			map.put("dW",this.dW);
			map.put("zFBL",this.zFBL);
			map.put("jX",this.jX);
			map.put("cD",this.cD);
			map.put("qYBZ",this.qYBZ);
			map.put("yYBM",this.yYBM);
			map.put("gGSJ",simpleDateFormat.format(this.gGSJ));
		} catch (Exception e) {
			e.printStackTrace();
		}
		return map;
	}

	public Ea_demo_sfxm mapToEa_demo_sfxm(Map map){
		try {
			String xMID =  map.get("xMID").toString();
			String sFDLBM =  map.get("sFDLBM").toString();
			String xMMC =  map.get("xMMC").toString();
			String xMRJ =  map.get("xMRJ").toString();
			String gG =  map.get("gG").toString();
			String dW =  map.get("dW").toString();
			double zFBL = Double.parseDouble( map.get("zFBL").toString());
			String jX =  map.get("jX").toString();
			String cD =  map.get("cD").toString();
			String qYBZ =  map.get("qYBZ").toString();
			String yYBM =  map.get("yYBM").toString();
			java.util.Date gGSJ = simpleDateFormat.parse( map.get("gGSJ").toString());
			Ea_demo_sfxm ea_demo_sfxm = new Ea_demo_sfxm(xMID, sFDLBM, xMMC, xMRJ, gG, dW, zFBL, jX, cD, qYBZ, yYBM, gGSJ);
			return ea_demo_sfxm;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	} 
	
	public String toString(){
		return ea_demo_sfxmToMap().toString();
	}
	
	//方便数据操作	
	public Ea_demo_sfxm insert(){
		return DB.insert(this);
	}
	public Ea_demo_sfxm update(){
		return DB.update(this);
	}
	
	public int delete(){
		return DB.delete(this);
	}
	
}
